﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Unity;
using Spinnerets.UI.Web;

namespace Spinnerets.UI.Services
{
    /// <summary>
    /// Manages the Unity container and each of the service instances for the current process.
    /// </summary>
    public static class ServiceManager
    {
        static readonly UnityContainer _serviceContainer = new UnityContainer();

        /// <summary>
        /// Gets the service container.
        /// </summary>
        /// <value>The service container.</value>
        public static UnityContainer ServiceContainer
        {
            get { return ServiceManager._serviceContainer; }
        } 

        /// <summary>
        /// Initializes the <see cref="ServiceManager"/> class.
        /// </summary>
        static ServiceManager()
        {
            _serviceContainer.RegisterInstance<UserRegistrationContext>(new UserRegistrationContext());
        }
    }
}
